# #创建列表
# #1.直接使用字面值来创建
# #   []就表示一个空的列表
# a = []
# print(type(a))
#
# #2.使用list() 来创建
# b = list()
# print(type(b))

# alist = [1, 2, 3, 4]
# print(alist)

# alist = [1, 'hello', True]
# print(alist)

# alist = [1, 2, 3, 4]
# # print(alist[2])
# print(alist[4])

# alist = [1, 2, 3, 4]
# print(alist)
# alist[2] = 100
# print(alist)
#
# alist = [1, 2, 3, 4]
# print(alist[100])

# alist = [1, 2, 3, 4]
# print(len(alist))

# #Python中的下标，其实还可以写成负数
# #例如：-1 <==> len(a)-1
# a = [1, 2, 3, 4]
# print(a[len(a)-1])
# print(a[-1])


# alist = [1, 2, 3, 4]
# print(alist[3])
# print(alist[-1])


